package com.neu.eurekaprovidestu.service;

import com.neu.dto.StuDto;
import com.neu.eurekaprovidestu.mapper.StuMapper;
import com.neu.util.CommonResult;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class StuService {

    @Resource
    private StuMapper stuMapper;
    public CommonResult doReg(StuDto dto) {
        CommonResult rst=new CommonResult();
        int row=stuMapper.save(dto);
        if(row==0){
            rst.setCode(100);
            rst.setMsg("失败");
        }
        return rst;
    }
}
